package DAOlogin;

import java.sql.ResultSet;
import java.sql.SQLException;

import banco.Conexao;

public class loginDAO {

	private static loginDAO loginDAO = null;
	
	private loginDAO() {
		
	}
	
	public static loginDAO getInstance(){
		if(loginDAO == null){
			loginDAO = new loginDAO();
		}
		return loginDAO;
	}
	
	public boolean isUsuario(String login, String senha) throws ClassNotFoundException,SQLException{
		Conexao conexao= Conexao.getInstancia();
		conexao.setLogin(login);
		conexao.setSenha(senha);
		if( Conexao.getInstancia().getConexao()!= null && !Conexao.getInstancia().getConexao().isClosed()){
			
			return true;

		}
		
		return false;
	}
	
}
